package Poker;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.TreeSet;

public class Poker2 {
    public static void main(String[] args) {
        //构建扑克
        String[] picture={"♠","♥","♣","♦"};
        String[] num={"A","2","3","4","5","6","7","8","9","10","J","Q","K"};


        //key取值 value存值
        ArrayList<Integer> key=new ArrayList<>();
        HashMap<Integer,String> value=new HashMap<>();

        int tem=0;

        for (int i = 0; i < picture.length; i++) {
            for (int j = 0; j < num.length; j++) {
                value.put(tem,picture[i]+num[j]);
                key.add(tem);
                tem++;
            }
        }
        value.put(tem,"大王");
        key.add(tem++);
        value.put(tem,"小王");
        key.add(tem);

        //洗牌
        Collections.shuffle(key);
        //发牌
        TreeSet<Integer> ha=new TreeSet<>();
        TreeSet<Integer> wa=new TreeSet<>();
        TreeSet<Integer> ga=new TreeSet<>();
        TreeSet<Integer> boss=new TreeSet<>();


        for (int i = 0; i <key.size(); i++) {
            if (i >= key.size()-3){
                boss.add(key.get(i));
            }else if( i % 3 == 0){
                ha.add(key.get(i));
            }else if( i % 3 == 1){
                wa.add(key.get(i));
            }else{
                ga.add(key.get(i));
            }

        }

        //看牌
    }
}
